from PyQt5.QtWidgets import QApplication
import sys
from TMainWindow import TMainWindow
from SerialThread import SerialThread
from queue import Queue

serial_data = []

if __name__ == "__main__":
    serial_data_queue = Queue(maxsize=100)

    thread = SerialThread(arg="COM6",queue=serial_data_queue)
    thread.setDaemon(True)
    thread.start()

    while True:
        print(serial_data_queue.get())

    app = QApplication(sys.argv)
    dlg = TMainWindow()
    dlg.setFixedSize(1280, 720)
    dlg.show()
    app.exec_()

